<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="<?=PATH_URL.'static/css/admin/'?>login.css" type="text/css">
<script type="text/javascript" src="<?=PATH_URL.'static/js/'?>jquery-1.4.2.min.js"></script>
<title>Admin Control Panel</title>
<!--[if ie 6]>
<style>
html, body{
behavior: url('<?php echo PATH_URL.'static/css/' ?>csshover3.htc');
}

.png, .box_top, .box, .box_bottom{
behavior: url('<?php echo PATH_URL.'static/css/' ?>iepngfix.htc');
}
</style>
<script type="text/javascript" src="<?php echo PATH_URL.'static/js/' ?>iepngfix_tilebg.js"></script>
<![endif]-->
<script type="text/javascript">
function EnterLogin(e){
	if(e.keyCode == 13){ 
		login();
	}
}

function login(){
	name = $('#loginUser').val();
	pass = $('#loginPass').val();
	if(name!='' && pass!=''){
		var url = '<?=PATH_URL.'admincp/login/'?>';
		$.post(url,{
				user: name,
				pass: pass
			},
			function(data){
				if(data==1){
					location.href="<?=PATH_URL.'admincp'?>";
				}else{
					$('#divError').html('Username or Password is incorrect.');
				}
			}
		);
	}else{
		$('#divError').html('Enter Username and Password.');
	}
}

function reset(){
	$('#loginUser').val('');
	$('#loginPass').val('');
}
</script>
</head>
<body>
<center>
<div id="body">
	<div id="main">
		<div class="bg_login">
			<div class="divInpUsername"><input  onkeypress="return EnterLogin(event)" class="inpLogin" type="text" id="loginUser" /></div>
			<div class="divInpPass"><input  onkeypress="return EnterLogin(event)" class="inpLogin" type="password" id="loginPass" /></div>
			<div id="divError">&nbsp;</div>
			<div onclick="login()" class="btLogin"></div><div onclick="reset()" class="btReset"></div>
			<div class="footerLogin">
				<div class="lostPass"><!--Lost your password?-->&nbsp;</div>
				<div class="powerby">Developed by ToanNQ</div>
			</div>
		</div>
	</div>
</div>
</center>
</body>
</html>